package com.b3a4a.ssmdemo.service.impl;

import com.b3a4a.ssmdemo.dao.UserDao;
import com.b3a4a.ssmdemo.entity.User;
import com.b3a4a.ssmdemo.service.UserService;
/*是dubbo的service*/
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/*service对象需要注册到zookeeper中*/
@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;
    @Override
    public List<User> findAll() {
        return userDao.findAll();
    }
}
